
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO

/*
----------------------------------------------------------------------------------------------------

-- Created By:  ()
-- Purpose: Updates a record in the Appointment table
-- Table Comment: Đặt lịch hẹn
----------------------------------------------------------------------------------------------------
*/


CREATE PROCEDURE dbo.Appointment_Update
(

	@Id int   ,

	@OriginalId int   ,

	@LocalId nvarchar (20)  ,

	@FirstName nvarchar (50)  ,

	@LastName nvarchar (50)  ,

	@FromTime datetime   ,

	@EndTime datetime   ,

	@Description nvarchar (500)  ,

	@Doctor nvarchar (100)  ,

	@ParentId varchar (15)  ,

	@AppointmentType varchar (20)  ,

	@CreatedDate datetime   
)
AS


				
				
				-- Modify the updatable columns
				UPDATE
					[dbo].[Appointment]
				SET
					[Id] = @Id
					,[LocalId] = @LocalId
					,[FirstName] = @FirstName
					,[LastName] = @LastName
					,[FromTime] = @FromTime
					,[EndTime] = @EndTime
					,[Description] = @Description
					,[Doctor] = @Doctor
					,[ParentId] = @ParentId
					,[AppointmentType] = @AppointmentType
					,[CreatedDate] = @CreatedDate
				WHERE
[Id] = @OriginalId 
				
			

GO
